<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>登陆</title>
		<link rel="stylesheet" href="${pageContext.request.contextPath}/backstage/css/style.css" type="text/css" />
		<script type="text/javascript" src="${pageContext.request.contextPath}/backstage/scripts/jquery-1.6.min.js"></script>
		<script type="text/javascript" SRC="${pageContext.request.contextPath}/backstage/scripts/jquery.validate_pack.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
				
				var validator = $("#loginform").validate({
					rules: {
						username: "required",
						password: "required"
					},
					messages: {
						username: "请填写用户名",
						password: "请填写密码"
					},
					errorPlacement: function(error, element) {
						error.insertAfter(element.parent().find('label:first'));
					},
					success: function(label) {
						label.html("&nbsp;").addClass("ok");
					}
				});
			
			});
		</script>
	</head>
	<body>
		<header id="top">
		<div class="wrapper-login">
			<div id="title">
				<img src="${pageContext.request.contextPath}/backstage/images/logo.png" />
			</div>
		</header>
		<div id="pagetitle">
			<div class="wrapper-login"></div>
		</div>
		<div id="page">
			<div class="wrapper-login">
				<section class="full">
				<h3>
					登陆
				</h3>
				<s:form id="loginform" method="post" action="login.action">
					<s:if test="error != null">
						<div class="box box-error">
							${ error }
						</div>
					</s:if>
					<p>
						<label class="required" for="username">
							用户名:
						</label>
						<br />
						<input id="username" class="full" name="username" class="text-input" type="text" />
					</p>
					<p>
						<label class="required" for="password">
							密码:
						</label>
						<br />
						<input type="password" id="password" class="full" value="" name="password" />
					</p>
					<p>
						<input type="submit" class="btn btn-green big" value="登陆" />
					</p>
					<div class="clear">
						&nbsp;
					</div>
				</s:form>
			</div>
		</div>
		<footer id="bottom">
			<div class="wrapper-login">
				<p>
					Copyright &copy; 2013
					<b>
				</p>
			</div>
		</footer>
	</body>
</html>
